import java.util.Scanner;

public class ForDemo15 {
    public static void main(String[] args) {
//        int sum = 0;// 用来装0-100之间的和
//        for (int i = 0; i <= 100; i++) {
//            sum += i;//sum = sum+i
//            if (i % 2 != 0) {
//                sum += i;
//            }
//        }
//        System.out.println(sum);

        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入起始值：");
        int start = scanner.nextInt();// 1
        System.out.println("请输入终止值：");
        int end = scanner.nextInt();//15
        int sum1 = 0;
        for (int i = start; i <= end; i++) {
            sum1 += i;
        }
        System.out.println(sum1);


    }
}
